module.exports = function($scope, item, $resource, $modalInstance){

    $scope.obj = item;
    console.log($scope.obj);
    $scope.getInfo = function(){
        $resource('/api/as/csc/auditorder/orderinfo', {}, {}).save({'code' : item.code}, function (res) {
            if (res.errcode === 0) {
              $scope.obj = res.data;
              console.log($scope.obj);
            } else {
              toaster.error({ title: '', body: res.errmsg });
            }
        });
    }
    $scope.getInfo();

    $scope.ok = function () {
    	//alert('ok');
    	$modalInstance.close();
    };

    $scope.cancel = function () {
    	$modalInstance.close();
    }

};